{% extends 'application.html' %}
{% block content %}
<div class="row">
    <div class="span8">
        <a href="/node/{{node.id}}"><h3 class="pull-left">{{node.host}}</h3></a>
    </div>
    <div class="span4">
        <ul class="pull-right nav nav-tabs">
            <li class="active"><a href="/node/{{node.id}}">当前概况</a></li>
            <li><a href="/node/{{node.id}}/edit">节点设置</a></li>
        </ul>
    </div>
</div>
<div class="row">
    <div class="span2"></div>
    <div class="span10">
        <table class="table" width="100%">
            <thead>
                <tr>
                    <th class="span2" style="text-align:right;padding-right:20px;">#</th>
                    <th class="span6">当前节点 - {{node.host}}</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td style="text-align:right;padding-right:20px;">节点状态</td>
                    <td><span id="status" class="label label-success">正常</span></td>
                </tr>
                <tr>
                    <td style="text-align:right;padding-right:20px;">套餐状态</td>
                    <td>私有</td>
                </tr>
                <tr>
                    <td style="text-align:right;padding-right:20px;">节点IP</td>
                    <td>{{node.host}}</td>
                </tr>
                <tr>
                    <td style="text-align:right;padding-right:20px;">操作系统</td>
                    <td><span id="system"></span></td>
                </tr>
                <tr>
                    <td style="text-align:right;padding-right:20px;">CPU使用</td>
                    <td>
                        <div class="progress">
                            <div id="cpu-us" class="bar bar-danger"></div>
                            <div id="cpu-free" class="bar bar-success"></div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td style="text-align:right;padding-right:20px;">内存使用</td>
                    <td>
                        <div class="progress">
                            <div id="men-us" class="bar bar-danger"></div>
                            <div id="men-free"class="bar bar-success"></div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td style="text-align:right;padding-right:20px;">网卡信息</td>
                    <td>
                        <table class="table-bordered" width="100%" border="0">
                            <thead>
                                <tr>
                                    <th class="span2">网卡</th>
                                    <th class="span1">流入/流出</th>
                                    <th class="span2">总流量</th>
                                    <th class="span2">实时速率</th>
                                </tr>
                            </thead>
                            <tbody id="ethx-all">
                            </tbody>
                        </table>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
</div>
<script type="text/javascript" charset="utf-8">
    var _node = {{node.id}};
</script>
{% endblock %}
{% block js %}
<script src="/static/js/nodes.js"></script>
{% endblock %}
